<?php
class Common
{
		static function dropBmonth(){
			$month=array(1=>'January','February','March','April','May','June','July','August','September','Octorber','November','December');
			print('<select name="ngay" class="select_info">');
			foreach($month as $key=>$value){
			print('<option value="'.$key.'">'.$value.'</option>');
			}
			print('</select>');
		}
		static function dropBday(){
			print('<select name="thang" class="select_info">');
			for($day=1;$day<=31;$day++){
				print('<option value="'.$day.'">'.$day.'</option>');				
			}
			print('</select>');
		}
		static function dropByear(){
			print('<select name="nam" class="select_info">');
			for($year=1970;$year<=2010;$year++){
				print('<option value="'.$year.'">'.$year.'</option>');				
			}
			print('</select>');
		}
		static function selectMonth($this_month){
			$monthName = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
			print ('<select name="thang" id="thang">');
			for ($i=0; $i < count($monthName); $i++){
				$mn = 1 + $i;
				if($mn == $this_month){
			print('<option selected value='.$mn.'>'.$monthName[$i].'</option>');}
				else{
				print('<option value='.$mn.'>'.$monthName[$i].'</option>');
				}
			}
			print ('</select>');
			}
		static function selectDay($today){
			print('<select name="ngay" id="ngay">');
			for($day=1;$day<=31;$day++){
			if($day==$today)print('<option value="'.$day.'" selected="selected">'.$day.'</option>');
			else print('<option value="'.$day.'">'.$day.'</option>');
			}
			print('</select>');
		}
		static function selectYear($this_year){
			print('<select name="nam" id="nam">');
			for($year=2000;$year<=2020;$year++){
			if($year==$this_year)print('<option value="'.$year.'" selected="selected">'.$year.'</option>');
			else print('<option value="'.$year.'">'.$year.'</option>');
			}
			print('</select>');
		}			
		
}
?>